Functional Enrichment Analysis | Tool: gprofileR.

net_dir = "/pastel/projects/speakeasy_dlpfc/SpeakEasy_singlenuclei/2nd_pass/snakemake-sn/results/"

macro_type = params$cell_type #macro_structure. It can be cell_type, metabolites, region of the brain. 
message(paste0("Cluster: ", macro_type))
## Cluster: oli

Enrichment Level 03

We removed the clusters with < 30 nodes for downstream analysis.

modules_file = read.table(paste0(net_dir, macro_type, "/geneBycluster.txt"), header = T)
modules_file = modules_file[, c("gene_name", "cluster_lv3")]
modules_file$module_clusters = paste0("m", modules_file$cluster_lv3)
modules_file$cluster_lv3 = NULL
colnames(modules_file) = c("symbol", "module_clusters") #only the sn was with gene_name instead of symbol

modules_size = as.data.frame(table(modules_file$module_clusters))
colnames(modules_size) = c("module", "n_nodes")
createDT(modules_size)

Module enrichment L3

Module m21

Module m25

Module m18

Module m30

Module m13

Module m17

Module m23

Module m26

Module m34

Module m33

Module m12

Module m19

Module m6

Module m1

Module m2

Module m5

Module m15

Module m7

Module m35

Module m20

Module m14

Module m8

Module m29

Module m3

Module m22

Module m27

Module m24

Module m28

Module m9

Module m10


Session info

sessionInfo()

R version 4.1.2 (2021-11-01) Platform: x86_64-pc-linux-gnu (64-bit) Running under: CentOS Stream 8

Matrix products: default BLAS/LAPACK: /usr/lib64/libopenblasp-r0.3.15.so

locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] DT_0.20 plotly_4.10.0 knitr_1.37 gprofiler2_0.2.1 ggeasy_0.1.3 readxl_1.3.1 kableExtra_1.3.4 R.matlab_3.6.2 forcats_0.5.1 stringr_1.4.0
[11] dplyr_1.0.8 purrr_0.3.4 readr_2.1.2 tidyr_1.2.0 tibble_3.1.6 tidyverse_1.3.1 limma_3.50.1 ggfortify_0.4.14 ggplot2_3.3.5

loaded via a namespace (and not attached): [1] bitops_1.0-7 fs_1.5.2 lubridate_1.8.0 webshot_0.5.2 RColorBrewer_1.1-2 httr_1.4.2 tools_4.1.2 backports_1.4.1 bslib_0.3.1
[10] utf8_1.2.2 R6_2.5.1 vipor_0.4.5 DBI_1.1.2 lazyeval_0.2.2 colorspace_2.0-3 withr_2.4.3 tidyselect_1.1.2 gridExtra_2.3
[19] compiler_4.1.2 cli_3.2.0 rvest_1.0.2 xml2_1.3.3 sass_0.4.0 scales_1.1.1 systemfonts_1.0.4 digest_0.6.29 rmarkdown_2.11
[28] svglite_2.1.0 R.utils_2.11.0 pkgconfig_2.0.3 htmltools_0.5.2 dbplyr_2.1.1 fastmap_1.1.0 htmlwidgets_1.5.4 rlang_1.0.1 rstudioapi_0.13
[37] shiny_1.7.1 jquerylib_0.1.4 generics_0.1.2 jsonlite_1.7.3 crosstalk_1.2.0 R.oo_1.24.0 RCurl_1.98-1.6 magrittr_2.0.2 Rcpp_1.0.8
[46] ggbeeswarm_0.6.0 munsell_0.5.0 fansi_1.0.2 lifecycle_1.0.1 R.methodsS3_1.8.1 stringi_1.7.6 yaml_2.3.5 grid_4.1.2 promises_1.2.0.1
[55] crayon_1.5.0 haven_2.4.3 hms_1.1.1 pillar_1.7.0 reprex_2.0.1 glue_1.6.1 evaluate_0.15 data.table_1.14.2 modelr_0.1.8
[64] httpuv_1.6.5 vctrs_0.3.8 tzdb_0.2.0 cellranger_1.1.0 gtable_0.3.0 assertthat_0.2.1 xfun_0.29 mime_0.12 xtable_1.8-4
[73] broom_0.7.12 later_1.3.0 viridisLite_0.4.0 pheatmap_1.0.12 beeswarm_0.4.0 ellipsis_0.3.2